projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8742d42
)
Fix message for VFL parser errors
author
Emmanuele Bassi
<ebassi@gnome.org>
Wed, 11 Mar 2020 15:14:17 +0000
(15:14 +0000)
committer
Emmanuele Bassi
<ebassi@gnome.org>
Wed, 11 Mar 2020 15:14:17 +0000
(15:14 +0000)
The loop is iterating over the wrong variable, and it's reimplementing
g_strfill() in a less efficient way.
gtk/gtkconstraintlayout.c
patch
|
blob
|
history
diff --git
a/gtk/gtkconstraintlayout.c
b/gtk/gtkconstraintlayout.c
index 497d748d72a82118f7f4edf09a4ad50e3efacdf7..7f012da0c613693d11143bd4bd7835bf2af5fffe 100644
(file)
--- a/
gtk/gtkconstraintlayout.c
+++ b/
gtk/gtkconstraintlayout.c
@@
-2016,14
+2016,7
@@
gtk_constraint_layout_add_constraints_from_descriptionv (GtkConstraintLayout *la
char *squiggly = NULL;
if (range > 0)
- {
- squiggly = g_new (char, range + 1);
-
- for (int r = 0; r < range; i++)
- squiggly[r] = '~';
-
- squiggly[range] = '\0';
- }
+ squiggly = g_strnfill (range, '~');
g_set_error (error, GTK_CONSTRAINT_VFL_PARSER_ERROR,
internal_error->code,